<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
      <functional-component>
        <p>hello</p>
        <p>world</p>
      </functional-component>
    </div>
    <script src="vue.js"></script>
    <script>
        Vue.component('functional-component',{
            functional:true,
            render(createElement,context){
                //children是子Vnode节点的数组
                const {children} = context;
                console.log(children)
                return createElement('div',children);
            }
        });
        var vm = new Vue({
            el:'#app',
        });
    </script>
</body>
</html>